package com.chensheng;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.Random;
import java.util.UUID;

/**
 * @Author:ChenSheng
 * @Description:
 * @Date: Created in 下午 15:21 2018/5/15 0015
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class UUIDtest {

    @Test
    public void test(){
        String key = UUID.randomUUID().toString().replace("-", "");
        System.out.println(key);
    }

    @Test
    public void test2(){
        Random random = new Random();
        Integer number = random.nextInt(9000000) + 1000000;
        System.out.println(number);

        System.out.println(System.currentTimeMillis() + number);
    }

}
